import com.lagou.bean.Resume;
import com.lagou.dao.ResumeDAO;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(value = "com.lagou")
public class MongoTemplateMain {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(MongoTemplateMain.class, args);

        ResumeDAO resumeDAO = context.getBean(ResumeDAO.class);
//
//        Resume resume = new Resume();
//        resume.setName("王五");
//        resume.setCity("深圳");
//        String dateStr = "1992-10-11 13:11:12";
//        resume.setBirthday(dateStr);
//        resume.setExpectSalay(5663447587676.0);
//        resumeDAO.insertResume(resume);
//        System.out.println(resume);
        System.out.println(resumeDAO.findByCity("北京"));
    }
}
